function setScheduleDimensions(){
	//Determine size we have to work with.
	var pageWidth = jQuery('.body-content').width();
	var navWidth = jQuery('#app-west').width();
	var calendarWidth = pageWidth - navWidth;
	var headerTotalHeight = jQuery('.body-content #cal-header').outerHeight();
	var toolbarHeight = jQuery('.x-panel-tbar').height();
	//Calendar minus toolbar height
	var calendarHeight = jQuery('#calendar-body').height();
	calendarHeight = calendarHeight - toolbarHeight;
	jQuery('#app-calendar').width(calendarWidth);
	
	//Month View
	var weekRowWidth = calendarWidth - 20;
	jQuery('#app-calendar-month').height(calendarHeight);
	jQuery('#app-calendar-month #month-week-names-tbl').width(weekRowWidth);
	jQuery('#app-calendar-month #week-row-bg-tbl').width(weekRowWidth);
	jQuery('#app-calendar-month #week-row-event-tbl').width(weekRowWidth);

	//Week View
	jQuery('#app-calendar-week').height(calendarHeight);
	jQuery('#week-view-body').height(calendarHeight - 89);
	jQuery('#app-calendar-week #week-week-row').width(calendarWidth - 70);
}

$(document).ready(function() {
	setScheduleDimensions();
	
	$(window).resize(function() {
		setScheduleDimensions();
	});
});